regular expression examples in theory of automata